<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="../js/vue.js"></script>
    <script>
        Vue.productionTip = false
    </script>
    <title>事件的基本使用</title>
</head>
<body>
    <div id="app">
        <h1>Vue事件</h1>
        <button v-on:click="shouInfo('jake',$event)">展示信息</button>
    </div>
    <script>
        const vm = new Vue({
            data(){
                return {
                    name:'张三',
                }
            },
            methods: {
                shouInfo(val,event){
                    console.log(event);
                    console.log(`My name is ${this.name}, ${val}`)
                }
            },
        }).$mount('#app')
    </script>
</body>
</html>